package utils

/*
大数加法，只适用于整数
*/
func bigIntegerPlus(s1 string, s2 string) (plus string) {
	n1, n2 := toArr(s1), toArr(s2)
	return toString(doBigIntegerPlus(n1, n2))
}

/*
大数减法，只适用于整数
*/
func bigIntegerSub(s1 string, s2 string) (sub string) {
	n1, n2 := toArr(s1), toArr(s2)
	return toString(doBigIntegerSub(n1, n2))
}

/*
大数乘法，只适用于整数
*/
func bigIntegerMultiply(s1 string, s2 string) (multiply string) {
	n1, n2 := toArr(s1), toArr(s2)
	return toString(doBigIntegerMultiply(n1, n2))
}

/*
大数除法，只适用于整数
返回倍数和余数
*/
func bigIntegerDivide(s1 string, s2 string) (multiple string, reminder string) {
	n1, n2 := toArr(s1), toArr(s2)
	r1, r2 := doBigIntegerDivide(n1, n2)
	return toString(r1), toString(r2)
}
